package com.jt9003.service.impl;

import com.jt9003.dao.ItemType;
import com.jt9003.pojo.Item_type;
import com.jt9003.service.ItemTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ItemTypeServiceImpl implements ItemTypeService {
    @Resource
    private ItemType itemType;

    //增加收费类型√
    @Override
    public int insertItemType(String itemTypeName) {
        int i = itemType.insertItemType(itemTypeName);
        return i;
    }

    //删除收费类型√
    @Override
    public int deleteItemTypeById(int itemTypeId) {
        int i = itemType.deleteItemTypeById(itemTypeId);
        return i;
    }

    //修改收费类型
    @Override
    public int updateItemTypeById(Item_type item_type) {
        int i = itemType.updateItemTypeById(item_type);
        return i;
    }

    //修改收费类型状态
    @Override
    public int updateItemTypeStateById(Item_type item_type) {
        int i = itemType.updateItemTypeStateById(item_type);
        return i;
    }

    @Override
    public List<Item_type> selectItem_typeByNameOrPinyinInitials(String itemTypeName, Integer start, Integer limit) {
        List<Item_type> i=itemType.selectItem_typeByNameOrPinyinInitials(itemTypeName, start, limit);
        return i;
    }

    @Override
    public int getItem_typeCountByResult(String itemTypeName) {
        int i=itemType.getItem_typeCountByResult(itemTypeName);
        return i;
    }

    @Override
    public List<Item_type> selectItem_typeList(Integer start, Integer limit) {
        List<Item_type>i=itemType.selectItem_typeList(start,limit);
        return i;
    }

    @Override
    public int deleteItem_typeById(List<Integer> idList) {
        int i=itemType.deleteItem_typeById(idList);
        return i;
    }

    @Override
    public int getItem_typeCount() {
        int i=itemType.getItem_typeCount();
        return i;
    }


}
